/**
 * chdev_stubs.h - stubs for memory management.
 *
 *  Copyright (C) 2008  ZhangHu
 *  All rights reserved.
 *  E-MAIL: anmnmnly@gmail.com
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
#ifndef __CHDEV_STUBS_H__
#define __CHDEV_STUBS_H__

typedef struct _device {
    list_t link;
    word_t used_cnt;
    char_t *name;
    char_t mid;
    char_t sid;
    char_t dev_type;
    bool_t delete_flag;
    void (*release)(void);
} device_t;

#define DEV_FALSE 0
#define DEV_OK 1
#define DEV_NO_MEM 0x2
#define DEV_NO_DEVICE 0x3
#define DEV_BUSY 0x4
#define DEV_FREE 0x5

#define kmalloc malloc
#define kfree free

void char_device_unregister(uword_t chdevMID, uword_t chdevSID)
{

}



word_t char_device_register(device_t *dev, const char_t *Name,
                            char_t Mid, char_t Sid,
                            void (*release)(void)) {
    return 0;
}


#endif
